UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NkhrGNPQ6q162aJqeLvEFWsD78AFytHYWSXQzwXPQzA='
WHERE
key_id = '7501f8443f5b85adc7d2d8aa045f15ca14bb9aa1c981b1ba681bf24e91bdabd2'
AND (
token = 'NkhrGNPQ6q162aJqeLvEFWsD78AFytHYWSXQzwXPQzA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)