UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uBJEfoKjZTU+Pt14rCwqsLiAkVvKqof97101UF8LxIQ=' 
WHERE 
  key_id = '496acb1329710940579a3b49b81e6971e4ca35c8fd428f69b0ba2dbed6efd5aa' 
  AND (
    token = 'uBJEfoKjZTU+Pt14rCwqsLiAkVvKqof97101UF8LxIQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036