UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aFI6CmiBFZkTGoCYQdLOW2jrsbBD5vvMq9WPj1ReZgY='
WHERE
key_id = '3550697581d5d2d20365bb44a32246495eb3e7a76a9819e6d61ae99cf8fd0c08'
AND (
token = 'aFI6CmiBFZkTGoCYQdLOW2jrsbBD5vvMq9WPj1ReZgY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)