UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TGPY75FzmWLz8nbExEX+/087LXBDJlpg4AG3GTyY/wc='
WHERE
key_id = '4e34abf287b9bbcf27cc9c0a45ef4db697f3c26fcd9112b221f84bc3927270ab'
AND (
token = 'TGPY75FzmWLz8nbExEX+/087LXBDJlpg4AG3GTyY/wc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)