UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fj9Yo8rHug4lzaR9PS1/OUGlVQmNo7U4nv+NOYoUgw0='
WHERE
key_id = 'fbd656a9d47e698bd311646e8e2dfd45b4cc895c346332aa7456fb28ffa8aacf'
AND (
token = 'Fj9Yo8rHug4lzaR9PS1/OUGlVQmNo7U4nv+NOYoUgw0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)