UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pm8aPBbUT+XmX80qdnPBxlTo5QgLGildy4Y3qxBVum4=' 
WHERE 
  key_id = '61e3bc7c2ac111b95230dc44d2b13137a0be83f8b3c43ead60246c1da971fac3' 
  AND (
    token = 'pm8aPBbUT+XmX80qdnPBxlTo5QgLGildy4Y3qxBVum4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042