UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hYzzJrBYnM7tXgSedN4pNi2V63tfJi/0uPFeIhtb/4k=' 
WHERE 
  key_id = '2448a67f7c2fc593d08845e97dccaf0a409b0f2a15eeaeb3b9ed264c43eb2aab' 
  AND (
    token = 'hYzzJrBYnM7tXgSedN4pNi2V63tfJi/0uPFeIhtb/4k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033