UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WwJoDO2SUlFbt7YzHjnVV8/7BDGmikYjZivfZ5Ar1vs=' 
WHERE 
  key_id = '7dfa9a7f7beeaa0b4a762bccd00818892373373015a18136ca5c5ee2b42276d5' 
  AND (
    token = 'WwJoDO2SUlFbt7YzHjnVV8/7BDGmikYjZivfZ5Ar1vs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032