UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tmx1cJvLjQiC6jttnrkE6iGnDG/Zgd4P9BMiwlCXxE0='
WHERE
key_id = '15aba1cfb6e01fcb3527372b9d4fad01b180a715ce9f9e49553b0b7c83b408d4'
AND (
token = 'tmx1cJvLjQiC6jttnrkE6iGnDG/Zgd4P9BMiwlCXxE0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)