UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nuInhsPbCLK7SoBF5oBKo9B3NOkEVCvN4zfBOJ0RApw='
WHERE
key_id = '1eb59535fd8301e2a0062627714eb0cd32bbc525582e53c449cef0a47791c10f'
AND (
token = 'nuInhsPbCLK7SoBF5oBKo9B3NOkEVCvN4zfBOJ0RApw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)