UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zDM6PmzVSSEbiLOfn+yuccx4ZyB2OJSrpEMToiQyZ+s='
WHERE
key_id = 'a55d6cd16d1122767d74375aebebb8ec6f8dad3fbbeba1e8299fb3f52e84fc5b'
AND (
token = 'zDM6PmzVSSEbiLOfn+yuccx4ZyB2OJSrpEMToiQyZ+s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)