UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UASZPSvLPFn3zeyCID+sthUBNWqfglJYqtruwlLlrwk=' 
WHERE 
  key_id = '0acbea2513ee0903684061ea4572a402025bd495e6f19c81d184f1cdfe07abb8' 
  AND (
    token = 'UASZPSvLPFn3zeyCID+sthUBNWqfglJYqtruwlLlrwk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022