UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w14vgojshScPDBR6vtCvn6w+ks2U5Sk/MDvV4zLvcvQ='
WHERE
key_id = '8d3bf1c4b3729ec2af7d96c70279e55826ebf091f3dec3a3d67879d199f9ec61'
AND (
token = 'w14vgojshScPDBR6vtCvn6w+ks2U5Sk/MDvV4zLvcvQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)