UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M9R/VywfSze+Lh4glKQyBfrAZ6aZcnn4cdhFgMeRgMw='
WHERE
key_id = 'a5d84fcc27906e1563d6b8271a04c62428d5468f0079ae152f9b13c79829ff5f'
AND (
token = 'M9R/VywfSze+Lh4glKQyBfrAZ6aZcnn4cdhFgMeRgMw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)