UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'AARTajyx6Qba2D2BGRVr8rHJXbnL3cce+QCuKU0ta58=' 
WHERE 
  key_id = '36973c6847425e8e2ab741b0a5003691d2be6bfab5bbf67c6be81bd89e7a2c5e' 
  AND (
    token = 'AARTajyx6Qba2D2BGRVr8rHJXbnL3cce+QCuKU0ta58=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016