UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Rdac66fOVnB6ia/p6aPi34AxasaUy8MRhvDGlNs+cHw=' 
WHERE 
  key_id = '46c0db228ac64f4e5d3144f2c8277ef45f3b20def68104db53f3d22dd2e04724' 
  AND (
    token = 'Rdac66fOVnB6ia/p6aPi34AxasaUy8MRhvDGlNs+cHw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043