UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GtuMdxY6FtA77WjVGUbA/Cb3rd8J8g/jMG5r6DwlqyA='
WHERE
key_id = '7bc42a995c9e6491b4d27cc5ab0978d92893bfa2c403abb3c4aad6b26592af61'
AND (
token = 'GtuMdxY6FtA77WjVGUbA/Cb3rd8J8g/jMG5r6DwlqyA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)