UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tCEWExhnz4eisiDnmla4kgHsFufCP6nEl/Tlm+nyYAs=' 
WHERE 
  key_id = '28ef837885b65147310c16ee62a69f32578d717e0f6a642a48d8c56976809c9b' 
  AND (
    token = 'tCEWExhnz4eisiDnmla4kgHsFufCP6nEl/Tlm+nyYAs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017