UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YVyg+u4Y4ByQhBnQ5Bnrz1iTxjUkpHdOCR45sJ5S1GE='
WHERE
key_id = 'e5abb045214022721d1c11bfff08aa9db3b9cbe3745b7ede28ad97479f482792'
AND (
token = 'YVyg+u4Y4ByQhBnQ5Bnrz1iTxjUkpHdOCR45sJ5S1GE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)