UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7hXtyin1/ZgOmZQ7skwKjCxe2vQYhoQh39tTnKoOa1k='
WHERE
key_id = '1135a14014a6c1187ec9517c6acbde9a8eca9e190e3b63aadf01dc2891c4be58'
AND (
token = '7hXtyin1/ZgOmZQ7skwKjCxe2vQYhoQh39tTnKoOa1k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)