UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iGGmbIDF7YNszGem2p49qIWrEf5ZUiU5qIwGBvqRaA0='
WHERE
key_id = '2c2d1a65c950420f94f2352cdfa638fb6ad0a0ec8287724935e5b05bc8ee79f7'
AND (
token = 'iGGmbIDF7YNszGem2p49qIWrEf5ZUiU5qIwGBvqRaA0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)