UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nZp3/OVu5RRDalVFP3mw/p1xZ7NsYNTp++X9bO34G3M='
WHERE
key_id = 'cb8eee991d63d86ece4764a59689b0392a17c5718a60947fed4e1fedac032e3e'
AND (
token = 'nZp3/OVu5RRDalVFP3mw/p1xZ7NsYNTp++X9bO34G3M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)