UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'D/ZEkU09rgfemUMpCjvExHQk5ORUeKKc/Tjm5kb8PDY='
WHERE
key_id = '08ffd5b68e435a91cc2c5aa80e516c744e69f3deb67b3d9ad93a4454058986b1'
AND (
token = 'D/ZEkU09rgfemUMpCjvExHQk5ORUeKKc/Tjm5kb8PDY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)