UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QFIAaLx9TAMWkwTu/W09F2HW91NSZDYUJb3kTYOl/90='
WHERE
key_id = 'b59f0f69a0220bbc89bf5cb67d78c94470a7b0c818614ed15c65a84241c43732'
AND (
token = 'QFIAaLx9TAMWkwTu/W09F2HW91NSZDYUJb3kTYOl/90='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)