UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xr5g58v8ZeAIXFcThFdgw/nvzxtnzV9Xn9fmtePfp7o='
WHERE
key_id = '53e759a5118a2f57c0febe87d6c271d8193845517161bc055c19fcc322bf178b'
AND (
token = 'xr5g58v8ZeAIXFcThFdgw/nvzxtnzV9Xn9fmtePfp7o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)