UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+kf3zk/RLiaagUY0KaGd1DC2BwgDuE0Zsb+iHNOF9nk='
WHERE
key_id = 'cab80b995760bef3c6402b885dbeffbb45cc2aeb527bb318bd5d23a79404377a'
AND (
token = '+kf3zk/RLiaagUY0KaGd1DC2BwgDuE0Zsb+iHNOF9nk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)