UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't/ZMxZtNy5eYKhrLrs2rivghdpbdgQVPeED8TtzHlkU='
WHERE
key_id = '93cf8bc7406b575e5ccc667c0128200c68fcf7f7492a38fc0ddc1ff2ef155265'
AND (
token = 't/ZMxZtNy5eYKhrLrs2rivghdpbdgQVPeED8TtzHlkU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)