UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U0fUchC5OgggR7+4L1PMio/XsgHH6FLezOpnLn1mxNA='
WHERE
key_id = '3fe2e1c42d7dd98ade732bd80c9cfc14423cf3fd496c3b5b11db8dbb883052aa'
AND (
token = 'U0fUchC5OgggR7+4L1PMio/XsgHH6FLezOpnLn1mxNA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)