UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OXJwARR6zFF80hEc23V0APYMowxeOzWaMTJt/E1WU3s='
WHERE
key_id = '478e2587d2a0116da8ba5e1d75012b57e3fa7bb5f86a52ca391119d422d3c548'
AND (
token = 'OXJwARR6zFF80hEc23V0APYMowxeOzWaMTJt/E1WU3s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)