UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6X96/sjvRwIxAELnXjzVdSiVAiCEYrR/9fwTNW05U3A=' 
WHERE 
  key_id = 'da254f3c0ae7d73d6212ded0152edae556add80372c703ab2ab4ca847641eb74' 
  AND (
    token = '6X96/sjvRwIxAELnXjzVdSiVAiCEYrR/9fwTNW05U3A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032