UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FCGxBFGnwVinNutoXzoVg9u4Z1NDOurMjcdHzwKuhJQ='
WHERE
key_id = 'd2085eb2fa1c4ed47b9179908a83a394b270a71c2f11959fcf6f7973eff6a1ac'
AND (
token = 'FCGxBFGnwVinNutoXzoVg9u4Z1NDOurMjcdHzwKuhJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)