UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JnoT9NNRy1/mn5qOUH8byH5DVQuHCxYX6qnXtNR8mbM='
WHERE
key_id = '919b1bf259054810d0747946241a103d74ddfbd37205e255b62b536044d3efc4'
AND (
token = 'JnoT9NNRy1/mn5qOUH8byH5DVQuHCxYX6qnXtNR8mbM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)