UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6v+XXxVF2LTxtx2sqygjcYT0Ee6+YadBxYvxoq/w7ME='
WHERE
key_id = '233ba169be02b1edea7f311642b57b00643fd559d9604496978599dfd4bcd66a'
AND (
token = '6v+XXxVF2LTxtx2sqygjcYT0Ee6+YadBxYvxoq/w7ME='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)