UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2ylO1OKKCQHA8K5qibhAESVbKxtnSo4qpgmL91/2Lxw=' 
WHERE 
  key_id = '4a67e1fe85ed4ba472d39355f001300cc9fee1b5348a4907a7e3038c58df19ee' 
  AND (
    token = '2ylO1OKKCQHA8K5qibhAESVbKxtnSo4qpgmL91/2Lxw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035