UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ekScFVTqQ3rMVM+l8H8gPT0izcucMF6KLx+EtXp1QlY='
WHERE
key_id = '7eef714f5fe7da513ca5792ad64e97be29db5bc974119c21a77a1a6897975054'
AND (
token = 'ekScFVTqQ3rMVM+l8H8gPT0izcucMF6KLx+EtXp1QlY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)