UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vGXo7JTI2EkDF+w9zetQ9jQOZjz+otpsCEwfjmHCu0E=' 
WHERE 
  key_id = '4fcaf1f7033b3d30ee2bd2f61886b6cd6fe00777ed378bef1a6bb415d8da1d8f' 
  AND (
    token = 'vGXo7JTI2EkDF+w9zetQ9jQOZjz+otpsCEwfjmHCu0E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040