UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mh3/o4o3HdlwmhPbdsJMLF8/T1pFM5K0GDuYwL2wCrw=' 
WHERE 
  key_id = '81e2e81b48d1ca3348ef560046774d5b8681422553b30508ae0b1aefdaa705fd' 
  AND (
    token = 'mh3/o4o3HdlwmhPbdsJMLF8/T1pFM5K0GDuYwL2wCrw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031