UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Lf2p/XwhU7P4RPKVCcK4p+olVUeMHMqorSWtXjXoXdQ='
WHERE
key_id = '3e938050007bbe1816b7214bdedfe3f60ddbea1073b2552920b9e848b3581b48'
AND (
token = 'Lf2p/XwhU7P4RPKVCcK4p+olVUeMHMqorSWtXjXoXdQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)