UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VlCcDtPIo0OLnUIvUGjMo7XeD9zluVeUumDjBrqJNhw='
WHERE
key_id = '36aeb03eaad887efd3b85d7fa177cb712c4e08f8510f07a053bf4a0e4aab296c'
AND (
token = 'VlCcDtPIo0OLnUIvUGjMo7XeD9zluVeUumDjBrqJNhw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)