UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lBVcGFMvz8kJW7Un4Tef/a4oovQOaS8F/RGggbHUnjw=' 
WHERE 
  key_id = 'd0ca9e8f16eba618070fa9e1acef436ca3bbee568a6d0316289ddeac4cd04134' 
  AND (
    token = 'lBVcGFMvz8kJW7Un4Tef/a4oovQOaS8F/RGggbHUnjw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037