UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HZnuvVMpk8q7n1oEf8ZkxEFbA/bp4TzewDBQg0tfnqc='
WHERE
key_id = '53252c3dc6667978c15e03e7e1447c42abdb5577e8567db5ba312e655ca651b6'
AND (
token = 'HZnuvVMpk8q7n1oEf8ZkxEFbA/bp4TzewDBQg0tfnqc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)