UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bKyuxj/Cz4Ri4hn2/Wp8GmeUFCdvtg3Lv5AJl7dYEQI=' 
WHERE 
  key_id = '85b93ed717d66a4dc339b15905b74f6fd11c8e38328f1d76b06b2f85f2a8886c' 
  AND (
    token = 'bKyuxj/Cz4Ri4hn2/Wp8GmeUFCdvtg3Lv5AJl7dYEQI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039