UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jbpGXTbt9/alkjq6bQcoMMVKYbBSDohqkaunm3UnEAM='
WHERE
key_id = '86abaa51df565688692d782fe2349e816cd1960ffc582b40856c260efc552f70'
AND (
token = 'jbpGXTbt9/alkjq6bQcoMMVKYbBSDohqkaunm3UnEAM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)